<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui穿梭树弹窗</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../../../js/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="../../../css/public.css" media="all" />
</head>
<body class="childrenBody">
    <form class="layui-form">
        <div id="test1" style="text-align: center"></div>
    </form>
    <script type="text/javascript" src="../../../js/layui/layui.js"></script>
    <script type="text/javascript" src="../../../js/public.js"></script>
    <script type="text/javascript">
        layui.use(['form','layer','transfer'], function() {
            var $ = layui.jquery
                , layer = parent.layer
                , form = layui.form
                , transfer = layui.transfer;

            // 穿梭树渲染
            transfer.render({
                elem: '#test1'  // 绑定元素
                ,data: [
                    {"value": "1", "title": "李白", "disabled": "", "checked": ""}
                    ,{"value": "2", "title": "杜甫", "disabled": "", "checked": ""}
                    ,{"value": "3", "title": "贤心", "disabled": "", "checked": ""}
                ]
                ,id: 'demo1' // 定义索引
            });
        });
    </script>
</body>
</html>